<template>
  <div class="carousel_box">
    <el-carousel :interval="6000" arrow="always">
      <el-carousel-item v-for="item in imgArr" :key="item.id">
        <img :src="item.image" alt="" />
      </el-carousel-item>
    </el-carousel>
  </div>
</template>

<script>
export default {
  // 组件名称
  name: "Login",
  // 组件参数 接收来自父组件的数据
  props: {},
  // 局部注册的组件
  components: {},
  // 组件状态值
  data() {
    return {
      imgArr: [
        {
          id: "1",
          image: require("@/assets/imgs/img2.png"),
        },
        {
          id: "2",
          image: require("@/assets/imgs/img2.png"),
        },
      ],
    };
  },
  // 组件初始化
  created() {},
  // 组件实例挂载完毕
  mounted() {},
  //销毁事件
  destroyed() {},
  // 组件方法
  methods: {},
};
</script>

<style scoped lang="less">
img {
  width: 100%;
  height: 100%;
}
.carousel_box {
  width: 100%;
  height: 100%;
}
/deep/.el-carousel__container{
min-height: 350px !important;
}
</style>
